using System;

namespace g_gongjianta
{
    public class Sense : Core.Component
    {
        private bool isOnFlag = false;
        public event Action OnChanged;

        public bool IsOn
        {
            get => isOnFlag;
            set
            {
                if (value == isOnFlag)
                {
                    return;
                }

                isOnFlag = value;
                OnChanged?.Invoke();
            }
        }
    }
}